<template>
	<view class="content">
		<view class="box_bg" :style="'background: url('+ c_imgPath + 'indexBg.png'+ ') repeat-y 0 0 / 100% auto;'">

		</view>
		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
			<view v-for="(item,index) in listdata" :key="index" class="qbt_con_item"
				@click="gotoPage( '/pages/chouka/tujian?id=' + item.id)">
				<view class="list_1">
					<image :src="item.imgurl_detail"></image>
				</view>
				<view class="bom_text">
					<view class="bom_text_title">{{item.title}}</view>
					<view class="bom_text_desc">所属IP：{{item.category_tile}}</view>
					<view class="bom_text_desc">所有卡片数量 {{item.all_count}}</view>
				</view>
			</view>
		</mescroll-body>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				z_imgPath: this.$z_img + 'chouka/',
				c_imgPath: 'https://qt.yhemall.com/chouka/',
				downOption: {
					auto: false
				},
				listdata: [],
				keyword: '',


			}
		},

		methods: {
			downCallback() {
				this.mescroll.resetUpScroll()
			},
			upCallback(page) {
				this.loadData(page.num);
			},
			loadData(pageNo) {
				// 模拟接口
				let that = this;
				that.req({
					url: 'card_goods_list',
					data: {
						page: pageNo,
						category_id: 0,
						user_id: uni.getStorageSync('userinfo').ID ? uni.getStorageSync('userinfo').ID : ''
					},
					success(res) {
						if (res.status == 1) {
							that.mescroll.endByPage(res.data.data.length, res.data.last_page);
							if (pageNo == 1) {
								that.listdata = res.data.data;
							} else {
								that.listdata = that.listdata.concat(res.data.data);
							}
						}
					}
				})
			},

		}
	}
</script>

<style>
	page {
		height: 100%;
	}

	.content {
		width: 100vw;
		/* height: 100vh; */
		box-sizing: border-box;
		position: relative;
		background-attachment: fixed;
		position: relative;
	}

	.title_ipt {
		display: flex;
		align-items: center;
		margin: 20rpx auto;
		border-radius: 30rpx;
		padding-left: 30rpx;
		width: 652rpx;
		height: 64rpx;
		background: #999999;
		border-radius: 32rpx;
		box-sizing: border-box;
	}

	.title_ipt>image {
		width: 26rpx;
		height: 26rpx;
	}

	.title_ipt>input {
		width: 77%;
		height: 60rpx;
		box-sizing: border-box;
		border-radius: 105rpx;
		font-size: 28rpx;
		line-height: 60rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(255, 255, 255, 0.6);
		padding-left: 20rpx;
	}

	.title_ipt>view {
		width: 94rpx;
		height: 35rpx;
		background: #B07CDD;
		border-radius: 18rpx;
		font-size: 23rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-right: 20rpx;
	}



	.qbt_con_item {
		width: 630rpx;
		margin: 20rpx auto;
		padding: 30rpx;
		background: #0A091A;
		border: 1rpx solid;
		border-image: linear-gradient(0deg, #666666, #DDDDDD) 10 10;
		display: flex;
		align-items: center;
	}

	.list_1 {
		border-radius: 7rpx;
	}

	.list_1>image {
		width: 140rpx;
		height: 163rpx;
		border-radius: 7rpx;
	}

	.list_1>view:nth-of-type(1) {
		color: #FFFFFF;
		font-size: 28rpx;
		box-sizing: border-box;
	}

	.redu {
		width: 100%;
		padding: 6rpx 20rpx;
		box-sizing: border-box;
		height: 82rpx;
		color: #FFFFFF;
		font-size: 20rpx;
		border-radius: 0 0 7rpx 7rpx;
	}

	.list_2 {
		padding: 20rpx;
		color: #FFFFFF;
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		font-size: 28rpx;
		margin-top: 50rpx;
	}

	.list_2_text {
		font-size: 72rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		background: linear-gradient(0deg, #B2ADC6 0.78125%, #FFFFFF 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
	}

	.list_2>view:nth-of-type(2) {
		width: 130rpx;
		height: 38rpx;
		background: #B07CDD;
		border-radius: 18rpx;
		font-size: 20rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.bom_text {
		line-height: 41rpx;
		margin-left: 20rpx;
	}

	.bom_text_title {
		flex: 1;
		font-size: 28rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		color: #FFFFFF;
	}

	.bom_text_desc {
		font-size: 24rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #FFFFFF;
		opacity: 0.6;
	}

	.bom_text_num {
		font-size: 28rpx;
		color: #FFFFFF;
	}

	.bom_text_num text {
		color: #AB7DFF;
	}
</style>